import request from '@/utils/request'
import {exportEvaluate} from "./evaluate";

// 查询订单列列表
export function listOrders(query) {
  return request({
    url: '/system/orders/list',
    method: 'get',
    params: query
  })
}

// 查询订单列详细
export function getOrders(ordersId) {
  return request({
    url: '/system/orders/' + ordersId,
    method: 'get'
  })
}

// 新增订单列
export function addOrders(data) {
  return request({
    url: '/system/orders',
    method: 'post',
    data: data
  })
}

// 修改订单列
export function updateOrders(data) {
  return request({
    url: '/system/orders',
    method: 'put',
    data: data
  })
}

// 删除订单列
export function delOrders(ordersId) {
  return request({
    url: '/system/orders/' + ordersId,
    method: 'delete'
  })
}

// 导出订单列
export function exportOrders(query) {
  return request({
    url: '/system/orders/export',
    method: 'get',
    params: query
  })
}

//统计订单情况 --用于首页展示
export function statifyOrderCount() {
  return request({
    url: '/system/orders/statifyOrderCount',
    method: 'get',
  })
}

//统计订单15天情况 --用于首页展示折线图
export function statifyOrderLine() {
  return request({
    url: '/system/orders/statifyOrderLine',
    method: 'get',
  })
}

//订单发货
export function ship(ordersNo) {
  return request({
    url: '/system/orders/ship/'+ordersNo,
    method: 'get',
  })
}

//订单发货
export function cancleOrders(data) {
  return request({
    url: '/system/orders/ordersCancel',
    method: 'post',
    data: data
  })
}

//重新打印
export function rePrint(ordersId) {
  return request({
    url: '/system/orders/reprint/'+ordersId,
    method: 'get',
  })
}
